<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="http://java.sun.com/jsp/jstl/myFn" prefix="myFn" %>
<html>
  <head>
  	<%@ include file="/jspf/public.jspf" %>
  	<link rel="stylesheet" type="text/css" href="${shop}/js/tree/jquery.treeview.css">
  	<script type="text/javascript" src="${shop}/js/tree/jquery.treeview.js"></script>
  	<script type="text/javascript">
  		$(function(){
  			$(".filetree").treeview({
  				/* 展开还是收起, 默认为false 展开*/
				collapsed: true,
				/* 唯一的, 当前菜单打开的时候其他菜单收缩*/
				unique: true
  			});
  		});
  	</script>
  </head>
  
  <body>     
  	 <ul class="filetree">
		  	 <c:forEach items="${applicationScope.privilegeList}" var="privilege">
			  		 <li>
			  	 		<span class="folder">${privilege.name}</span>
			  	 		 <ul>
					  	 	 <c:forEach items="${privilege.childrenSet}" var="temp">
					  	 	 	<!-- 显示子菜单,判断isleft是否true -->
					  	 	 	<c:if test="${temp.isleft}">
					  	 	 		<li>
					  	 	 			<span class="file">
							  	 	 		<a href="${wshop}/${temp.url}" target="right">${temp.name}</a>
					  	 	 			</span>
						  	 		</li>
					  	 	 	</c:if>
					  	 	 </c:forEach>
			  	 	  	</ul>
			  	 	 </li>
		  	 </c:forEach>
	  	 </ul>
  </body>
</html>
